<#assign authentication = Request['SPRING_SECURITY_CONTEXT'].authentication />
<#assign authorities = authentication.authorities />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
	<head>
		<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
		
		<link href="${rc.contextPath}/resources/images/favicon.ico" rel="SHORTCUT ICON" />
		
		<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css" rel="stylesheet" />
		<link type="text/css" href="${rc.contextPath}/resources/styles/default.css" rel="stylesheet" />
		
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.js"></script>
		<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
		
		<script type="text/javascript" src="${rc.contextPath}/resources/scripts/Main.js"></script>
		<script type="text/javascript" src="${rc.contextPath}/resources/scripts/Ui.js"></script>
		
		<title><@spring.message "head.title" /></title>
		
		<#include "variables.ftl" encoding="UTF-8">
		
		<script type="text/javascript">
			var main, ui;
			
			$(document).ready(function() {
				$.ajaxSetup({
					cache : false
				});
				
				main = new Main();
				main.init();
			});
		</script>
	</head>
	<body>
		<div id="placeHolder">
			<div id="header">
				<h1>Bem vindo ao controle de lojas!</h1>
				
				<#assign messageParameters = ["${authentication.name}", "${rc.getContextPath()}/j_spring_security_logout"] />
				
				<p><@spring.messageArgs "loggedUser" messageParameters /></p>
			</div>
			<div id="menu">
			</div>
			<div id="content">
				<div id="loading" style="display: none;">
					<p><@spring.message "loading" /></p>
				</div>
				<div id="innerContent">
				</div>
			</div>
		</div>
	</body>
</html>
